<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <link rel="stylesheet" href="../css/cssreset.css">
        <link rel="stylesheet" href="../css/style.css">
        <link rel="stylesheet" href="../css/style2.css"> 
        <script src="../js/jquery-1.11.1.min.js"></script>
        
        <script>
        	
            


			    $(".more").click(function(e){
			    		$('body').css("overflow","hidden")
			        e.preventDefault();
			        $("#cover3").css("display","block");
			        $("#cover3").animate({
			            width: "100%",
			            height: "1800px",
			            top: "0",
			            left: "0"
			        },10);
			        
			    });
			    $(".close").click(function(){
			    	$('body').css("overflow","scroll")
			        $("#cover3").removeAttr("style");
			        $("#cover-content2").removeAttr("style");
			    });
                $('.sh1').mouseover(function(event) {
                    $('.showhide1').css('display', 'block');
                });
                $('.sh1').mouseout(function(event) {
                    $('.showhide1').css('display', 'none');
                });
                $('.sh2').mouseover(function(event) {
                    $('.showhide2').css('display', 'block');
                });
                $('.sh2').mouseout(function(event) {
                    $('.showhide2').css('display', 'none');
                });
                $('.sh3').mouseover(function(event) {
                    $('.showhide3').css('display', 'block');
                });
                $('.sh3').mouseout(function(event) {
                    $('.showhide3').css('display', 'none');
                });
                
            })
        </script> 
       
    </head>
    <body>
    	<div class="bigbox xlbox">
    		<nav class="daohan">
                <span class="scolor"></span>
                <ul>
                    <li class="sh1">
                        <a href="../html/index.html" id="sline"><p class="mline"><span class="smallicon" id="current"></span><span class="navtxt" id="current2">用户开发</span><span class="ripic"></span></p></a>
                        <div class="showhide1"> 
	                        <a href="../html/gerenkehu.html" id="sline1"">
		                        <p class="mline">
		                             <span class="smallicon" id="ziji1"></span>
		                             <span class="navtxt" id="current2" style="	font-size: 14px;">个人客户</span>
		                        </p>
                            </a>

                             <a href="../html/qiyekehu.html" style="font-size:14px;margin-top:-22px;background:#435565;">
                             <p class="mline">
                             	<span class="smallicon" id="ziji2"></span>
                             	<span class="navtxt" id="current2" style="font-size: 14px;color:#929da8;">企业客户</span>
                             </p>
                             </a>   
                        </div>
                    </li>
                    <li class="sh2">
                        <a href="../html/client.html"><p class="mline"><span class="smallicon one1"></span><span class="navtxt">客户信息</span><span class="ripic"></span></p></a>
                        <div class="showhide2">
                        	<a href="../html/index.html" style="font-size:14px;background:#435565;">
                             <p class="mline">
                             	<span class="smallicon" id="ziji3"></span>
                             	<span class="navtxt" id="current2" style="font-size: 14px;color:#929da8;">个人信息</span>
                             </p>
                             </a> 

                             <a href="../html/index.html" style="font-size:14px;margin-top:-22px;background:#435565;">
                             <p class="mline">
                             	<span class="smallicon" id="ziji4"></span>
                             	<span class="navtxt" id="current2" style="font-size: 14px;color:#929da8;">企业信息</span>
                             </p>
                             </a>    
                        </div>
                        </li>
                    <li class="sh3">
                        <a href="../html/sale1.html"><p class="mline"><span class="smallicon one2"></span><span class="navtxt">合同审批</span><span class="ripic"></span></p></a>
                        <div class="showhide3">
                        	<a href="../html/index.html" style="font-size:14px;background:#435565;">
                             <p class="mline tiao">
                             	<span class="smallicon" id="ziji3"></span>
                             	<span class="navtxt" id="current2" style="font-size: 14px;color:#929da8;">合同审批表</span>
                             </p>
                             </a> 

                             <a href="../html/index.html" style="font-size:14px;margin-top:-22px;background:#435565;">
                             <p class="mline tiao">
                             	<span class="smallicon" id="ziji4"></span>
                             	<span class="navtxt" id="current2" style="font-size: 14px;color:#929da8;">合同审核表</span>
                             </p>
                             </a>    
                        </div>
                    </li>
                    <li class="sh4">
                        <a href="#"><p class="mline"><span class="smallicon one3"></span><span class="navtxt">资料共享</span></p></a>

                    </li>
                </ul>
            </nav>
            
    		<div class="showbox">
                <h2>进 入 合 同 审 批</h2>
                <div class="showbox2">
	    		
	    			<div class="aaa">
		    			<div class="smalltitle">
							
							
							<a href="../html/htshenpi.html" style="width:160px;top:6px;"><span class="imgmove imgmove2" style="top:2px;"><img src="../images/fanhui.png" alt=""></span>&nbsp;&nbsp;返回首页</a>
		 					 
		    			</div>
	    				<ol class="htnav">
							<li class="changebg"><a href="../html/inhtshenpi.html"  style="color:#fff;">合同审批</a></li>	 
							<li><a href="../html/inhtshenhe.html">合同审核</a></li>	 
	    				</ol>
	    				<div class="apprcontent">
    							
    					</div>			
    				</div>
	    			</div>
	    			
					 <div id="cover3">
						<div id="cover-bg3"></div>
						<form action="" id="cover-content2">
							<h4>合 同 审 批 详 情<span class="close"></span></h4>
							<p class="main" style="margin-top:50px;">
								<span class="leftmain">提 交 时 间</span>
								<input type="text" class="shurukuang"  id="saleStageName">
							</p>
							<p class="main">
								<span class="leftmain">合 同 编 号</span>
								<input type="text"  class="shurukuang"  id="contractId">
							</p>
							<p class="main">
								<span class="leftmain">个 人 名 称</span>
								<input type="text"  class="shurukuang" id="username">
							</p>
							<p class="main">
								<span class="leftmain">联 系 方 式</span>
								<input type="text"  class="shurukuang" id="relation">
							</p>
							<p class="main">
								<span class="leftmain">保 证 金&nbsp;&nbsp;&nbsp;&nbsp;</span>
								<input type="text"  class="shurukuang"  id="deposit">
							</p>
							<p class="main">
								<span class="leftmain">合 同 期 限</span>
								<input type="text"  class="shurukuang" id="contractTime">
							</p>
							<p class="main">
								<span class="leftmain">客 户 电 话</span>
								<input type="text"  class="shurukuang" id="clientelePhone">
							</p>
							<p class="main">
								<span class="leftmain">客 服 Q Q&nbsp;</span>
								<input type="text"  class="shurukuang"  id="serviceQQ">
							</p>
							<p class="main">
								<span class="leftmain">现在办公地址</span>
								<input type="text"  id="workLocation"  class="shurukuang" style="width:255px;margin-left: 21px">
							</p>
							<p class="main" style="height:100px;">
								<span class="leftmain" style="position:absolute;">合 同 内 容</span>
								<textarea name="" id="contractContent" class="shurukuang" style="height:100px;margin-left: 31%;"></textarea>
							</p>
							<p class="main" style="height:100px;">
								<span class="leftmain" style="position:absolute;">其 他 内 容</span>
								<textarea name="" id="reserve" class="shurukuang" style="height:100px;margin-left: 31%;"></textarea>
							</p>
							
							<p class="main">
								<span class="leftmain">激 活 时 间</span>
								<input type="text"  class="shurukuang"  id="activateTime">
							</p>
							<p class="main">
								<span class="leftmain">所 属 特 会</span>
								<input type="text"  class="shurukuang" id="preferential">
							</p>
							<p class="main">
								<span class="leftmain">审 批 状 态</span>
								<select id="approvalState" class="shenfenselect shenfenselect3">
								<option>已批准</option>
								<option>未批准</option>
								</select>
							</p>
							<p class="main" style="height:100px;">
								<span class="leftmain" style="position:absolute;">审 批 意 见</span>
								<textarea name="" id="approveOpinion" class="shurukuang" style="height:100px;margin-left: 31%;border:1px solid #bfbfbf;background:#fff;"></textarea>
							</p>
							<p class="main" style="height:100px;">
								<span class="leftmain" style="position:absolute;">审 批 说 明</span>
								<textarea name="" id="remarks" class="shurukuang" style="height:100px;margin-left: 31%;border:1px solid #bfbfbf;background:#fff;"></textarea>
							</p>
							<p class="main" style="text-align:center;margin-top:15px;">
								<button class="btn1 btn2">保存</button>
							</p>
						</form>
					 </div>
	    		</div>
	    	</div>
            </div>
            <div class="M-box"></div>
    	</div> 
    	<script src="../js/jquery-1.11.1.min.js"></script>
	    <script src="../js/jquery.pagination.js"></script>
	    <script type="text/javascript">
		    $('.M-box').pagination({
			pageCount: 2,//总页数
			current: 1,//当前页码
			callback:function(api){
				var pageNum=api.getCurrent();
		        $.ajax({  
		            type : "POST",  
		            url : "data.json",//路径  
		            data : {  
		            	pageNum : api.getCurrent()  
		            },
		            success : function(data) {
		            	var number=data[0].number;//总页数
		            	api.setPageCount(number);//动态修改总页数为20页
		            	var pageNum=data[0].pageNum;
		            	var text="";
		            	$('.trs').remove();
                      for(var i=0;i<data[0].list.length;i++){
                           
                            text=$('<div class="content trs"><h6 class="sbox1"><span>客户姓名：'+data[0].list[i].ApproverId+'</span><span>类别：'+data[0].list[i].type+'</span><span>审批状态：'+data[0].list[i].approvalState+'</span><span>提交日期：'+data[0].list[i].saleStageName+'</span></h6><h5 class="ssbox1">正文：'+data[0].list[i].contractContent+'</h5><a href="#" class="more" onclick="dian('+data[0].list[i].approveId+','+pageNum+')">查看更多 ></a></div>');
                            $('.apprcontent').append(text);
                          }
		            }
		        });  
		    }
		},function(api){
		    var pageNum;
		    $.ajax({  
		        type : "POST",  
		        url : "data.json",//路径  
		        data : {  
		        	pageNum : api.getCurrent()   
		        },
		        success : function(data) {		     
		        	var number=data[0].number;//总页数
		        	api.setPageCount(number);//动态修改总页数为20页
		        	var pageNum=data[0].pageNum;
		        	var text="";  
                    for(var i=0;i<data[0].list.length;i++){
                            text=$('<div class="content trs"><h6 class="sbox1"><span>客户姓名：'+data[0].list[i].ApproverId+'</span><span>类别：'+data[0].list[i].type+'</span><span>审批状态：'+data[0].list[i].approvalState+'</span><span>提交日期：'+data[0].list[i].saleStageName+'</span></h6><h5 class="ssbox1">正文：'+data[0].list[i].contractContent+'</h5><a href="#" class="more" onclick="dian('+data[0].list[i].approveId+','+pageNum+')">查看更多 ></a></div>');
                            $('.apprcontent').append(text);
                          } 

		        }
		    });  
		});
		</script> 
		<script>
    		function dian(obj){
                 $.ajax({
                     url: '<%=basePath %>approve/findContract.action',
                     type: 'post',
                     data: {approveId: obj.id},
                     success:function(data){
                       $('#flowname').val(data[0].flowNme);//审 批 流 程
                          $('#saleStageName').val(data[0].saleStageName);//提 交 时 间
                          $('#numbers').val(data[0].contractId);//合 同 编 号
                          $('#users').val(data[0].username);//个 人 名 称
                          $('#moneys').val(data[0].deposit);//保 证 金
                          $('#times').val(data[0].contractTime);//合 同 期 限
                          $('#photos').val(data[0].clientelePhone);//客 户 电 话
                          $('#qq').val(data[0].serviceQQ);//客 服 Q Q
                          $('#dizhi').val(data[0].workLocation);//现在办公地址
                          $('#states').val(data[0].approvalState);//审批状态
                          document.getElementById("textareas").innerText=data[0].contractContent;//合 同 内 容
                          document.getElementById("textareass").innerText=data[0].reserve;//其 他 规 定                        
           
                     }
                 })
                 $("#cover3").css("display","block");
             }
    	</script> 
    </body>
</html>
